* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.set-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.set-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.set-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.set-logo {
    font-size: 28px;
    font-weight: 700;
    color: #4361ee;
    display: flex;
    align-items: center;
}

.set-logo i {
    margin-right: 10px;
}

.set-settings-btn {
    background: #4361ee00;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.set-settings-btn:hover {
    background: transparent;
    transform: rotate(30deg);
    /*box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);*/
}

.set-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.set-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.set-settings-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 910px;
    max-height: 90vh; /* 新增 */
    overflow: hidden; /* 新增 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.4s ease;
    display: flex;
    flex-direction: column;
}

.set-modal-overlay.active .set-settings-modal {
    transform: translateY(0);
}

.set-modal-header {
    background: linear-gradient(135deg, #686c7b 0%, #479a9f 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.set-modal-header h2 {
    font-weight: 600;
    font-size: 22px;
}

.set-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s ease;
}


.set-modal-body {
    display: flex;
    min-height: 500px;
    flex: 1;
    overflow-y: auto; /* 新增 */
    max-height: calc(90vh - 70px); /* 新增 */
}

.set-settings-tabs {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
}

.set-tab-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    text-align: left;
    border: none;
    background: none;
    font-size: 16px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.set-tab-btn i {
    width: 24px;
    margin-right: 10px;
}

.set-tab-btn:hover, .set-tab-btn.active {
    background: #e9ecef;
    color: #4361ee;
    border-left: 4px solid #4361ee;
}

.set-settings-content {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

.set-tab-content {
    display: none;
}

#set-form-valid {
    display: flex;
    flex-direction: column;
}

.set-tab-content.active {
    display: block;
    animation: set-fadeIn 0.4s ease;
}

@keyframes set-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.set-section-title {
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    color: #4361ee;
}

.set-form-group {
    margin-bottom: 20px;
}

.set-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.set-input[type="text"],
.set-input[type="password"],
.set-input[type="email"],
.set-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    transition: border 0.3s ease;
}

.set-input:focus,
.set-textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.set-avatar-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.set-current-avatar {
    flex: 0 0 150px;
}

.set-current-avatar img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4361ee;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.set-avatar-upload {
    flex: 1;
    min-width: 300px;
}

.set-upload-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #4361ee;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-bottom: 15px;
}

.set-upload-btn:hover {
    background: #3a56d4;
}

#set-avatar-input {
    display: none;
}

.set-crop-container {
    display: none;
    margin-top: 20px;
}

.set-crop-preview {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
}

.set-crop-actions {
    display: flex;
    gap: 10px;
}

.set-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.set-btn-primary {
    background: #4361ee;
    color: white;
}

.set-btn-primary:hover {
    background: #3a56d4;
}

.set-btn-secondary {
    background: #6c757d;
    color: white;
}

.set-btn-secondary:hover {
    background: #5a6268;
}

.set-submit-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.set-submit-btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.set-submit-btn:hover {
    background: #3a56d4;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.set-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    /*background: #4caf50;*/
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.4s ease;
    z-index: 1100;
}

.set-notification.show {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .set-modal-body {
        flex-direction: column;
    }

    .set-settings-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        display: flex;
        overflow-x: auto;
    }

    .set-tab-btn {
        border-left: none;
        border-bottom: 4px solid transparent;
        text-align: center;
        padding: 15px 10px;
    }

    .set-tab-btn i {
        display: block;
        margin: 0 auto 5px;
    }

    .set-tab-btn:hover, .set-tab-btn.active {
        border-left: none;
        border-bottom: 4px solid rgba(28, 42, 101, 0.58);
    }

    .set-avatar-section {
        flex-direction: column;
    }
}

/* background */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.set-settings-container {
    width: 660px;
    height: 1050px;
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: rgba(30, 30, 46, 0.9);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.set-preview-section {
    height: 40%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.set-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--set-bg-image, url('/chat-background/photo-1514888286974-6c03e2ca1dba.jpg'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    z-index: 1;
    filter: blur(20px);
    transition: background-image 0.5s ease, filter 0.5s ease;
}

.set-preview-image {
    width: 80%;
    height: 80%;
    background-image: var(--set-bg-image, url('/chat-background/photo-1514888286974-6c03e2ca1dba.jpg'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: background-image 0.5s ease;
}

.set-controls-section {
    height: 60%;
    padding: 25px;
    background-color: rgba(20, 20, 36, 0.8);
    z-index: 3;
    display: flex;
    flex-direction: column;
}

.set-section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 8px;
}

.set-stacked-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 8px;
}

.set-stacked-option {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.set-stacked-option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.set-stacked-option.active {
    border-color: #f72585;
    background: rgba(247, 37, 133, 0.2);
}

.set-stacked-thumb {
    width: 70px;
    height: 50px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 12px;
}

.set-stacked-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.set-stacked-info {
    flex: 1;
}

.set-stacked-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.set-stacked-info p {
    font-size: 0.85rem;
    color: #000000;
    line-height: 1.4;
}

.set-upload-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.set-upload-btn {
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-align: center;
    width: 100%;
}

.set-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#setFileInput {
    display: none;
}

.set-blur-control {
    margin-bottom: 25px;
}

.set-control-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.set-control-row label {
    width: 100px;
    font-size: 0.95rem;
    font-weight: 500;
}

.set-control-row input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    outline: none;
}

.set-control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f72585;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(247, 37, 133, 0.5);
}

.set-blur-value {
    width: 50px;
    text-align: right;
    font-size: 0.95rem;
}

.set-controls {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.set-button {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #f72585, #7209b7);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    flex: 1;
}

.set-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.set-button:active {
    transform: translateY(1px);
}

.set-image-info {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #adb5bd;
    font-style: italic;
    text-align: center;
}

/* 自定义滚动条 */
.set-stacked-selector::-webkit-scrollbar {
    width: 6px;
}

.set-stacked-selector::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.set-stacked-selector::-webkit-scrollbar-thumb {
    background: #f72585;
    border-radius: 10px;
}

.set-stacked-selector::-webkit-scrollbar-thumb:hover {
    background: #7209b7;
}
